<?php
!function_exists('zeai_alone') && exit('Forbidden!');
if(ifint($cook_uid)){
	$row = $db->ROW(__TBL_USER__,"tipnum","id=".$cook_uid." AND tipnum>0");
	$num= intval($row[0]);
	if($num>99){
		$tipnum_str = '<span id="num_btm">99+'.'</span>';
	}elseif($num>0){
		$tipnum_str = '<span id="num_btm">'.$num.'</span>';
	}
}
if($_ZEAI['Mnavbtmkind']==2){
	$Mnavbtm = json_decode($_ZEAI['Mnavbtm'],true);
	$nn=0;
	if(@is_array($Mnavbtm) && @count($Mnavbtm)>0){
		foreach ($Mnavbtm as $V){
			$title=$V['title'];$path1=$V['path1'];$url=$V['url'];
			if(empty($title) || empty($path1) || empty($url))continue;
			$nn++;
		}
	}
}
if($_ZEAI['Mnavbtmkind']==2 && $nn>0 ){
	$ww = intval(100/$nn);?>
    <style>.navdiy a.ed font,.navdiy a:hover font{color:<?php echo $_ZEAI['mob_mbcolor'];?>}.navdiy a{width:<?php echo $ww;?>%}</style>
	<div class="navdiy">
    	<div class="shadow"></div><?php
		foreach ($Mnavbtm as $V){
			$title=urldecode($V['title']);
			$var  =urldecode($V['var']);
			$path1=$V['path1'];
			$path2=$V['path2'];
			$url=urldecode($V['url']);
			$pathok=($nav==$var)?$path2:$path1;
			if(empty($title) || empty($path1) || empty($url))continue;?>
            <a href="<?php echo $url; ?>"<?php if($nav==$var)echo' class="ed"';?>><i><img src="<?php echo UP.$pathok;?>" /><?php if($var=='my_msg'){echo $tipnum_str;}?></i><font><?php echo $title;?></font></a>
		<?php }?>
	</div>
<?php }else{ ?>
	<style>
    nav a.ed font,nav a:hover font{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
    nav a:hover i,nav a.ed i{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
    nav a i{background-image:url('<?php echo RES; ?>m/img/ico.png?<?php echo $_ZEAI['cache_str'];?>');}
    <?php if(!@in_array('hn',$navarr)){?>nav a{width:25%}<?php }?>
    </style>
    <nav>
        <div class="shadow"></div>
        <a href="<?php echo HOST; ?>"<?php if($nav=='index')echo' class="ed"';?>><i class="navindex"></i><font>首页</font></a>
        <a href="<?php echo mHref('user'); ?>?photo_s=1&t=ext"<?php if($nav=='user')echo' class="ed"';?>><i class="navtj"></i><font>搜索</font></a>
        <?php if(@in_array('hn',$navarr)){?><a href="<?php echo mHref('hongniang'); ?>"<?php if($nav=='hongniang')echo' class="ed"';?>><i class="navhn"></i><font>红娘</font></a><?php }?>
        <a href="<?php echo mHref('my_msg'); ?>"<?php if($nav=='my_msg')echo' class="ed"';?>><i class="navmsg"><?php echo $tipnum_str;?></i><font>消息</font></a>
        <a href="<?php echo mHref('my'); ?>"<?php if($nav=='my')echo' class="ed"';?>><i class="navmy"></i><font>我的</font></a>
    </nav>
<?php }?>
</body>
</html>